<template>
  <div>
    <div class="bk-divider" :class="'is-' + align"><slot></slot></div>
  </div>
</template>

<script>
export default {
  props: {
    align: {
      type: String,
      default: "center",
    },
  },
};
</script>

<style scoped>
.bk-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: #969799;
  font-size: 15px;
  line-height: 24px;
  border-color: #ccc;
  border-style: solid;
  border-width: 0;
}

.bk-divider::before {
  margin-right: 16px;
  content: "";
}

.bk-divider.is-left::before,
.bk-divider.is-right::after {
  max-width: 10%;
}

.bk-divider::after {
  margin-left: 16px;
  content: "";
}

.bk-divider::before,
.bk-divider::after {
  display: block;
  flex: 1;
  box-sizing: border-box;
  height: 1px;
  border-color: inherit;
  border-style: inherit;
  border-width: 1px 0 0;
}
</style>